//
//  IFlyAudioRecorder.h
//  AIKITDemo
//
//  Created by xyzhang on 2023/3/1.
//

#import <Foundation/Foundation.h>
#import "IFlyAudioRecordDelegate.h"
#import <AVFoundation/AVFoundation.h>

NS_ASSUME_NONNULL_BEGIN

@interface IFlyAudioRecorder : NSObject

@property (nonatomic, weak) id<IFlyAudioRecorderDelegate>delegate;

+ (instancetype) sharedInstance;

- (BOOL)start;

- (void)stop;

/// 设置音频采样率
/// - Parameter rate: 采样率，8k/16k
- (void)setSample:(NSString *)rate;

/// 设置录音音量回调时间间隔参数
/// @param cycle 时间间隔
- (void)setPowerCycle:(float)cycle;

/// 设置音频保存路径
/// @param savePath 音频保存路径
-(void)setSaveAudioPath:(NSString *)savePath;

/// 录音器是否完成，完全结束返回YES，否则返回NO
- (BOOL)isCompleted;

@end

NS_ASSUME_NONNULL_END
